<section><h1>Accessing Child Modules From Other Modules</h1><h2>From Controllers</h2><p>To call (invoke) a child module from another Trongate module (that's <em>any</em> other kind of Trongate module!) we simply continue with our 'parent with a hyphen' policy when we are loading our child modules. <strong>Once the child module class has been successfully loaded, we no longer need to reference the parent module when invoking methods from the child module.</strong></p><p>Below is an example of our display() method - inside 'accessories' - being called from within our 'cars' module:</p><p>[code=php]&lt;?php
class Cars extends Trongate { 

  function index() { 
    $this-&gt;module("cars-accessories");
    $this-&gt;accessories-&gt;display(); 
  }

}
?&gt;
[/code]</p><h2>From Views</h2><p>Child Modules may be called from view files by following our convention of referencing the parent followed by a hyphen, when calling our child modules. For example:</p><p>[code=php]&lt;?= Modules::run("cars-accessories/display") ?&gt;
[/code]</p></section>